<?php /* Smarty version 2.6.16, created on 2012-08-30 14:52:56
         compiled from dashboard.tpl */ ?>
<?php echo '
<script language="javascript">
function mark_unread(message_id)
{	
$.ajax({
	   url:\'reply.php\',
	   data:\'flag=2&message_id=\'+message_id,
	   type:\'post\',		  
	   success:function(resp){
	   //alert(resp);		   	
		//	$(\'#reply_content_\'+message_id).html(resp);											
	   } 		   
});
}
</script>
'; ?>

	<div class="content">
		
				<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'user_tabs.tpl', 'smarty_include_vars' => array('active_tab' => 'dashboard')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
				
		<div align="right"><!--<p class="button-flex-big button90"><a href="coach_game_update.php"><span>Add Game</span></a></p></div-->
		
			<?php if ($this->_tpl_vars['is_partner'] == '0'): ?>
			<a class="button" style="float: right" href="training_partner_game_update.php?profile=Y">Become Training Partner</a>
			<!--label>Become a Training Partner :</label> <input type="radio" name="user_type" value="3" onclick="tp_game()"/-->
			<?php endif; ?> 
		    <?php if ($this->_tpl_vars['is_coach'] == '0'): ?>
			<!--label>Become a Coach :</label> <input type="radio" name="user_type" value="1" onclick="coach_game()" /-->
			<a class="button" style="float: right" href="coach_game_update.php?profile=Y">Become a Coach</a>
			<?php endif; ?>
			
			<div class="clear"></div>
	</div>
		<div class="content">
        <!-- tab -->
        <div class="clear"></div>
        <div class="tabular-content"> 
		 <div class="total-message">&nbsp;&nbsp;</div>              
           <div class="clear"></div>
           <div class="dashboard_area"> 
		   	
		   <div class="clear"></div>
		   <div class="dashboard_block new">
		       <h2>Messages</h2>
			   
            	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['latest_msgArrNum'] > 0): ?>
				  <?php unset($this->_sections['msg']);
$this->_sections['msg']['name'] = 'msg';
$this->_sections['msg']['loop'] = is_array($_loop=$this->_tpl_vars['latest_msgArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['msg']['show'] = true;
$this->_sections['msg']['max'] = $this->_sections['msg']['loop'];
$this->_sections['msg']['step'] = 1;
$this->_sections['msg']['start'] = $this->_sections['msg']['step'] > 0 ? 0 : $this->_sections['msg']['loop']-1;
if ($this->_sections['msg']['show']) {
    $this->_sections['msg']['total'] = $this->_sections['msg']['loop'];
    if ($this->_sections['msg']['total'] == 0)
        $this->_sections['msg']['show'] = false;
} else
    $this->_sections['msg']['total'] = 0;
if ($this->_sections['msg']['show']):

            for ($this->_sections['msg']['index'] = $this->_sections['msg']['start'], $this->_sections['msg']['iteration'] = 1;
                 $this->_sections['msg']['iteration'] <= $this->_sections['msg']['total'];
                 $this->_sections['msg']['index'] += $this->_sections['msg']['step'], $this->_sections['msg']['iteration']++):
$this->_sections['msg']['rownum'] = $this->_sections['msg']['iteration'];
$this->_sections['msg']['index_prev'] = $this->_sections['msg']['index'] - $this->_sections['msg']['step'];
$this->_sections['msg']['index_next'] = $this->_sections['msg']['index'] + $this->_sections['msg']['step'];
$this->_sections['msg']['first']      = ($this->_sections['msg']['iteration'] == 1);
$this->_sections['msg']['last']       = ($this->_sections['msg']['iteration'] == $this->_sections['msg']['total']);
?>	  				
                  <tr onClick="javascript:window.location.href='<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['link']; ?>
'; 
				  mark_unread(<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['message_id']; ?>
);" 
				  <?php if ($this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['is_read'] == 'Y'): ?>class="readmessage"
				  <?php else: ?>
				  	<?php if ($this->_sections['msg']['index']%2 != 0): ?>class="alter"<?php endif; ?>
				  <?php endif; ?>
				  >
				   <!-- uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
-->
                    <td width="50">
					<?php if ($this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo'] != ''): ?>
					<img src="uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
" border="0" alt="" />
					<?php else: ?>
					<img src="images/avatar_smallest.jpg" border="0" alt="" />
					<?php endif; ?>
					</td>
                    <td width="100"><strong><?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['from_name']; ?>
</strong></td>
                    <td width="100" style="padding-right:10px;"><strong><?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['date_add']; ?>
</strong></td>
                    <td><?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['message_text']; ?>
</td>
                  </tr>	
				    
	  			<?php endfor; endif; ?> 
				 <tr><td colspan="4">
				  <div class="button-flex-big button150"><a href="inbox.php"><span>View More</span></a></div></td></tr>	
				<?php else: ?>
				  <tr>
                    <td colspan="4"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
            </div>  
		   <div class="dashboard_block new">
		   <h2>Video Reviews</h2>
			   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['Numvideo'] > 0): ?>
				  <?php unset($this->_sections['vdoreview']);
$this->_sections['vdoreview']['name'] = 'vdoreview';
$this->_sections['vdoreview']['loop'] = is_array($_loop=$this->_tpl_vars['videoReviewArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['vdoreview']['show'] = true;
$this->_sections['vdoreview']['max'] = $this->_sections['vdoreview']['loop'];
$this->_sections['vdoreview']['step'] = 1;
$this->_sections['vdoreview']['start'] = $this->_sections['vdoreview']['step'] > 0 ? 0 : $this->_sections['vdoreview']['loop']-1;
if ($this->_sections['vdoreview']['show']) {
    $this->_sections['vdoreview']['total'] = $this->_sections['vdoreview']['loop'];
    if ($this->_sections['vdoreview']['total'] == 0)
        $this->_sections['vdoreview']['show'] = false;
} else
    $this->_sections['vdoreview']['total'] = 0;
if ($this->_sections['vdoreview']['show']):

            for ($this->_sections['vdoreview']['index'] = $this->_sections['vdoreview']['start'], $this->_sections['vdoreview']['iteration'] = 1;
                 $this->_sections['vdoreview']['iteration'] <= $this->_sections['vdoreview']['total'];
                 $this->_sections['vdoreview']['index'] += $this->_sections['vdoreview']['step'], $this->_sections['vdoreview']['iteration']++):
$this->_sections['vdoreview']['rownum'] = $this->_sections['vdoreview']['iteration'];
$this->_sections['vdoreview']['index_prev'] = $this->_sections['vdoreview']['index'] - $this->_sections['vdoreview']['step'];
$this->_sections['vdoreview']['index_next'] = $this->_sections['vdoreview']['index'] + $this->_sections['vdoreview']['step'];
$this->_sections['vdoreview']['first']      = ($this->_sections['vdoreview']['iteration'] == 1);
$this->_sections['vdoreview']['last']       = ($this->_sections['vdoreview']['iteration'] == $this->_sections['vdoreview']['total']);
?>	  				
                  <tr <?php if ($this->_sections['vdoreview']['index']%2 != 0): ?>class="alter"<?php endif; ?>>
				    <td width="50">
					<?php if ($this->_tpl_vars['videoReviewArr'][$this->_sections['vdoreview']['index']]['photo'] != ''): ?>
					<img src="uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['videoReviewArr'][$this->_sections['vdoreview']['index']]['photo']; ?>
" border="0" alt="" />
					<?php else: ?>
					<img src="images/avatar_smallest.jpg" border="0" alt="" />
					<?php endif; ?>
					</td>
                    <td width="100"><strong><?php echo $this->_tpl_vars['videoReviewArr'][$this->_sections['vdoreview']['index']]['name']; ?>
</strong><br />
					<i><?php echo $this->_tpl_vars['videoReviewArr'][$this->_sections['vdoreview']['index']]['user_type']; ?>
</i></td>
					
                    <td width="100" style="padding-right:10px;"><strong><?php echo $this->_tpl_vars['videoReviewArr'][$this->_sections['vdoreview']['index']]['vr_date']; ?>
</strong></td>
					<td><?php echo $this->_tpl_vars['videoReviewArr'][$this->_sections['vdoreview']['index']]['video_title']; ?>
</td>
                  </tr>				   
	  			<?php endfor; endif; ?> 
				 <tr><td colspan="4">
				  <div class="button-flex-big button150"><a href="my_video_review.php"><span>View More</span></a></div></td></tr>	
				<?php else: ?>
				  <tr>
                    <td colspan="4"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
		   </div>                 
           
        	<div class="clear"></div>
           
			 <div class="dashboard_block new">
		       <h2>Videos</h2>
			   
            	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['Numcoachvdo'] > 0): ?>
				  <?php unset($this->_sections['vdo']);
$this->_sections['vdo']['name'] = 'vdo';
$this->_sections['vdo']['loop'] = is_array($_loop=$this->_tpl_vars['CoachvdoArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['vdo']['show'] = true;
$this->_sections['vdo']['max'] = $this->_sections['vdo']['loop'];
$this->_sections['vdo']['step'] = 1;
$this->_sections['vdo']['start'] = $this->_sections['vdo']['step'] > 0 ? 0 : $this->_sections['vdo']['loop']-1;
if ($this->_sections['vdo']['show']) {
    $this->_sections['vdo']['total'] = $this->_sections['vdo']['loop'];
    if ($this->_sections['vdo']['total'] == 0)
        $this->_sections['vdo']['show'] = false;
} else
    $this->_sections['vdo']['total'] = 0;
if ($this->_sections['vdo']['show']):

            for ($this->_sections['vdo']['index'] = $this->_sections['vdo']['start'], $this->_sections['vdo']['iteration'] = 1;
                 $this->_sections['vdo']['iteration'] <= $this->_sections['vdo']['total'];
                 $this->_sections['vdo']['index'] += $this->_sections['vdo']['step'], $this->_sections['vdo']['iteration']++):
$this->_sections['vdo']['rownum'] = $this->_sections['vdo']['iteration'];
$this->_sections['vdo']['index_prev'] = $this->_sections['vdo']['index'] - $this->_sections['vdo']['step'];
$this->_sections['vdo']['index_next'] = $this->_sections['vdo']['index'] + $this->_sections['vdo']['step'];
$this->_sections['vdo']['first']      = ($this->_sections['vdo']['iteration'] == 1);
$this->_sections['vdo']['last']       = ($this->_sections['vdo']['iteration'] == $this->_sections['vdo']['total']);
?>	  				
                  <tr <?php if ($this->_sections['vdo']['index']%2 != 0): ?>class="alter"<?php endif; ?> >
				   <!-- uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
-->
                    <td width="50">
					<?php if ($this->_tpl_vars['CoachvdoArr'][$this->_sections['vdo']['index']]['video_image'] != ''): ?>
					<img src="uploaded/video_images/thumbs/<?php echo $this->_tpl_vars['CoachvdoArr'][$this->_sections['vdo']['index']]['video_image']; ?>
" border="0" alt="" width="37" height="27" />
					<?php else: ?>
					<img src="images/avatar_smallest.jpg" border="0" alt="" />
					<?php endif; ?>
					</td>
                    <td width="120"><strong><?php echo $this->_tpl_vars['CoachvdoArr'][$this->_sections['vdo']['index']]['video_title']; ?>
</strong></td>
                    <td width="100" style="padding-right:10px;"><strong><?php echo $this->_tpl_vars['CoachvdoArr'][$this->_sections['vdo']['index']]['date_add']; ?>
</strong></td>
                    <td><?php echo $this->_tpl_vars['CoachvdoArr'][$this->_sections['vdo']['index']]['game']; ?>
</td>
                  </tr>	
				   			   
	  			<?php endfor; endif; ?> 
				<tr><td colspan="4">
				  <div class="button-flex-big button150"><a href="upload_videos.php"><span>View More</span></a></div></td></tr>	
				<?php else: ?>
				  <tr>
                    <td colspan="4"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
            </div>  
			<?php if ($this->_tpl_vars['is_coach'] == '1'): ?>
		   <div class="dashboard_block new">
		   <h2>Lessons</h2>
			   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['Numcoachlesson'] > 0): ?>
				  <?php unset($this->_sections['lesson']);
$this->_sections['lesson']['name'] = 'lesson';
$this->_sections['lesson']['loop'] = is_array($_loop=$this->_tpl_vars['CoachlessonArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['lesson']['show'] = true;
$this->_sections['lesson']['max'] = $this->_sections['lesson']['loop'];
$this->_sections['lesson']['step'] = 1;
$this->_sections['lesson']['start'] = $this->_sections['lesson']['step'] > 0 ? 0 : $this->_sections['lesson']['loop']-1;
if ($this->_sections['lesson']['show']) {
    $this->_sections['lesson']['total'] = $this->_sections['lesson']['loop'];
    if ($this->_sections['lesson']['total'] == 0)
        $this->_sections['lesson']['show'] = false;
} else
    $this->_sections['lesson']['total'] = 0;
if ($this->_sections['lesson']['show']):

            for ($this->_sections['lesson']['index'] = $this->_sections['lesson']['start'], $this->_sections['lesson']['iteration'] = 1;
                 $this->_sections['lesson']['iteration'] <= $this->_sections['lesson']['total'];
                 $this->_sections['lesson']['index'] += $this->_sections['lesson']['step'], $this->_sections['lesson']['iteration']++):
$this->_sections['lesson']['rownum'] = $this->_sections['lesson']['iteration'];
$this->_sections['lesson']['index_prev'] = $this->_sections['lesson']['index'] - $this->_sections['lesson']['step'];
$this->_sections['lesson']['index_next'] = $this->_sections['lesson']['index'] + $this->_sections['lesson']['step'];
$this->_sections['lesson']['first']      = ($this->_sections['lesson']['iteration'] == 1);
$this->_sections['lesson']['last']       = ($this->_sections['lesson']['iteration'] == $this->_sections['lesson']['total']);
?>	  				
                  <tr <?php if ($this->_sections['lesson']['index']%2 != 0): ?>class="alter"<?php endif; ?>>
				   <!-- uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
-->
				    <td><?php echo $this->_tpl_vars['CoachlessonArr'][$this->_sections['lesson']['index']]['lesson_title']; ?>
</td>
                    <td width="100"><strong><?php echo $this->_tpl_vars['CoachlessonArr'][$this->_sections['lesson']['index']]['student_name']; ?>
</strong>
					</td>
                    <td width="50"><strong>$ <?php echo $this->_tpl_vars['CoachlessonArr'][$this->_sections['lesson']['index']]['lesson_price']; ?>
</strong></td>
                    <td width="100" style="padding-right:10px;"><strong><?php echo $this->_tpl_vars['CoachlessonArr'][$this->_sections['lesson']['index']]['date_add']; ?>
</strong></td>
                   
                   
                  </tr>				   
	  			<?php endfor; endif; ?> 
				 <tr><td colspan="4">
				  <div class="button-flex-big button150"><a href="add_lesson.php"><span>View More</span></a></div></td></tr>	
				<?php else: ?>
				  <tr>
                    <td colspan="4"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
		   </div>
		   <?php else: ?>
		    <div class="dashboard_block new">
		    <h2>Lessons</h2>
			   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['NumLesson'] > 0): ?>
				  <?php unset($this->_sections['mlesson']);
$this->_sections['mlesson']['name'] = 'mlesson';
$this->_sections['mlesson']['loop'] = is_array($_loop=$this->_tpl_vars['myLesson']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['mlesson']['show'] = true;
$this->_sections['mlesson']['max'] = $this->_sections['mlesson']['loop'];
$this->_sections['mlesson']['step'] = 1;
$this->_sections['mlesson']['start'] = $this->_sections['mlesson']['step'] > 0 ? 0 : $this->_sections['mlesson']['loop']-1;
if ($this->_sections['mlesson']['show']) {
    $this->_sections['mlesson']['total'] = $this->_sections['mlesson']['loop'];
    if ($this->_sections['mlesson']['total'] == 0)
        $this->_sections['mlesson']['show'] = false;
} else
    $this->_sections['mlesson']['total'] = 0;
if ($this->_sections['mlesson']['show']):

            for ($this->_sections['mlesson']['index'] = $this->_sections['mlesson']['start'], $this->_sections['mlesson']['iteration'] = 1;
                 $this->_sections['mlesson']['iteration'] <= $this->_sections['mlesson']['total'];
                 $this->_sections['mlesson']['index'] += $this->_sections['mlesson']['step'], $this->_sections['mlesson']['iteration']++):
$this->_sections['mlesson']['rownum'] = $this->_sections['mlesson']['iteration'];
$this->_sections['mlesson']['index_prev'] = $this->_sections['mlesson']['index'] - $this->_sections['mlesson']['step'];
$this->_sections['mlesson']['index_next'] = $this->_sections['mlesson']['index'] + $this->_sections['mlesson']['step'];
$this->_sections['mlesson']['first']      = ($this->_sections['mlesson']['iteration'] == 1);
$this->_sections['mlesson']['last']       = ($this->_sections['mlesson']['iteration'] == $this->_sections['mlesson']['total']);
?>	  				
                  <tr <?php if ($this->_sections['mlesson']['index']%2 != 0): ?>class="alter"<?php endif; ?>>
				   <!-- uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
-->
				    <td><?php echo $this->_tpl_vars['myLesson'][$this->_sections['mlesson']['index']]['lesson_title']; ?>
</td>
                    <td width="100"><strong><?php echo $this->_tpl_vars['myLesson'][$this->_sections['mlesson']['index']]['coach_name']; ?>
</strong>
					</td>
                    <td width="50"><strong>$ <?php echo $this->_tpl_vars['myLesson'][$this->_sections['mlesson']['index']]['lesson_price']; ?>
</strong></td>
                    <td width="100" style="padding-right:10px;"><strong><?php echo $this->_tpl_vars['myLesson'][$this->_sections['mlesson']['index']]['date_add']; ?>
</strong></td>
                   
                   
                  </tr>				   
	  			<?php endfor; endif; ?> 
				 <tr><td colspan="4">
				  <div class="button-flex-big button150"><a href="my_lesson.php"><span>View More</span></a></div></td></tr>	
				<?php else: ?>
				  <tr>
                    <td colspan="4"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
		   </div>
           <?php endif; ?>               
		   <div class="clear"></div>
           <?php if ($this->_tpl_vars['is_coach'] == '1'): ?>
			 <div class="dashboard_block new">
		       <h2>Coach Games</h2>
			   
            	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['Numcoachgame'] > 0): ?>
				  <?php unset($this->_sections['game']);
$this->_sections['game']['name'] = 'game';
$this->_sections['game']['loop'] = is_array($_loop=$this->_tpl_vars['CoachgameArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['game']['show'] = true;
$this->_sections['game']['max'] = $this->_sections['game']['loop'];
$this->_sections['game']['step'] = 1;
$this->_sections['game']['start'] = $this->_sections['game']['step'] > 0 ? 0 : $this->_sections['game']['loop']-1;
if ($this->_sections['game']['show']) {
    $this->_sections['game']['total'] = $this->_sections['game']['loop'];
    if ($this->_sections['game']['total'] == 0)
        $this->_sections['game']['show'] = false;
} else
    $this->_sections['game']['total'] = 0;
if ($this->_sections['game']['show']):

            for ($this->_sections['game']['index'] = $this->_sections['game']['start'], $this->_sections['game']['iteration'] = 1;
                 $this->_sections['game']['iteration'] <= $this->_sections['game']['total'];
                 $this->_sections['game']['index'] += $this->_sections['game']['step'], $this->_sections['game']['iteration']++):
$this->_sections['game']['rownum'] = $this->_sections['game']['iteration'];
$this->_sections['game']['index_prev'] = $this->_sections['game']['index'] - $this->_sections['game']['step'];
$this->_sections['game']['index_next'] = $this->_sections['game']['index'] + $this->_sections['game']['step'];
$this->_sections['game']['first']      = ($this->_sections['game']['iteration'] == 1);
$this->_sections['game']['last']       = ($this->_sections['game']['iteration'] == $this->_sections['game']['total']);
?>	  				
                  <tr <?php if ($this->_sections['game']['index']%2 != 0): ?>class="alter"<?php endif; ?> >
				   <!-- uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
-->
                    <td width="100" valign="top"><strong><?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['game']['index']]['game']; ?>
</strong>
					</td>
                    <td width="50" valign="top"><strong>$<?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['game']['index']]['rate']; ?>
</strong></td>
                    <td width="80" style="padding-right:10px;" valign="top"><strong><?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['game']['index']]['date_add']; ?>
</strong></td>
                    <td valign="top"><?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['game']['index']]['experience']; ?>
</td>
                     
                   </tr>				   
	  			 <?php endfor; endif; ?> 
				  <tr><td colspan="4">
				  <div class="button-flex-big button150"><a href="coach_game.php"><span>View More</span></a></div></td></tr>	
				<?php else: ?>
				  <tr>
                    <td colspan="4"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
            </div>  
		   <?php endif; ?>	
		   <?php if ($this->_tpl_vars['is_partner'] == '1'): ?>
		   <div class="dashboard_block new">
		   <h2>Training Partner Games</h2>
			   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabular_row" style="padding-top:10px;">
				<?php if ($this->_tpl_vars['Numtpgame'] > 0): ?>
				  <?php unset($this->_sections['game']);
$this->_sections['game']['name'] = 'game';
$this->_sections['game']['loop'] = is_array($_loop=$this->_tpl_vars['tpgameArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['game']['show'] = true;
$this->_sections['game']['max'] = $this->_sections['game']['loop'];
$this->_sections['game']['step'] = 1;
$this->_sections['game']['start'] = $this->_sections['game']['step'] > 0 ? 0 : $this->_sections['game']['loop']-1;
if ($this->_sections['game']['show']) {
    $this->_sections['game']['total'] = $this->_sections['game']['loop'];
    if ($this->_sections['game']['total'] == 0)
        $this->_sections['game']['show'] = false;
} else
    $this->_sections['game']['total'] = 0;
if ($this->_sections['game']['show']):

            for ($this->_sections['game']['index'] = $this->_sections['game']['start'], $this->_sections['game']['iteration'] = 1;
                 $this->_sections['game']['iteration'] <= $this->_sections['game']['total'];
                 $this->_sections['game']['index'] += $this->_sections['game']['step'], $this->_sections['game']['iteration']++):
$this->_sections['game']['rownum'] = $this->_sections['game']['iteration'];
$this->_sections['game']['index_prev'] = $this->_sections['game']['index'] - $this->_sections['game']['step'];
$this->_sections['game']['index_next'] = $this->_sections['game']['index'] + $this->_sections['game']['step'];
$this->_sections['game']['first']      = ($this->_sections['game']['iteration'] == 1);
$this->_sections['game']['last']       = ($this->_sections['game']['iteration'] == $this->_sections['game']['total']);
?>	  				
                  <tr <?php if ($this->_sections['game']['index']%2 != 0): ?>class="alter"<?php endif; ?> >
				   <!-- uploaded/user_images/thumbs/<?php echo $this->_tpl_vars['latest_msgArr'][$this->_sections['msg']['index']]['photo']; ?>
-->
                    <td width="120" valign="top"><strong><?php echo $this->_tpl_vars['tpgameArr'][$this->_sections['game']['index']]['game']; ?>
</strong>
					</td>
                    <td width="100" style="padding-right:10px;" valign="top"><strong><?php echo $this->_tpl_vars['tpgameArr'][$this->_sections['game']['index']]['date_add']; ?>
</strong></td>
                    <td valign="top"><?php echo $this->_tpl_vars['tpgameArr'][$this->_sections['game']['index']]['experience']; ?>
</td>
                     
                   </tr>				   
	  			 <?php endfor; endif; ?>
				  <tr><td colspan="3">
				  <div class="button-flex-big button150"><a href="training_partner_game.php"><span>View More</span></a></div></td></tr>	 
				<?php else: ?>
				  <tr>
                    <td colspan="3"><center><strong>No Record Exists</strong></center></td>
                  </tr>		
				<?php endif; ?>                                
                </table>
		   </div>
           <?php endif; ?>               
            <div class="clear"></div>   
            </div>         
        </div>
    </div>